package com.gym.client;

import com.gym.pojo.Cashier;
import com.gym.pojo.Goods;
import com.gym.pojo.Purchase;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(name = "gateway",path = "/coprovider",contextId = "coprovider")
public interface GoodsClient {
    @RequestMapping("/selectcp")
    public Map<String,Object> selectcp(@RequestParam String goodsname,@RequestParam int page,@RequestParam int limit);
    @RequestMapping("insertsm")
    public boolean insertsm(@RequestBody Purchase purchase,@RequestParam int totalstock);
    @RequestMapping("selectsm")
    public Map<String,Object> selectsm(@RequestParam Integer cashierId,@RequestParam int page,@RequestParam int limit);
    @RequestMapping("/insertjh")
    public boolean insertjh(@RequestBody Goods goods);
    @RequestMapping("selectsl")
    public boolean selectsl(@RequestParam int goodsId,@RequestParam int goodsamount);
    @RequestMapping("selectysp")
    public boolean selectysp(@RequestParam String goodsname);
    @RequestMapping("selectzkc")
    public boolean selectzkc(@RequestParam int goodsId,@RequestParam int totalstock);
    @RequestMapping("selectzj")
    public List<Goods> selectzj();
    @RequestMapping("insertzj")
    public boolean insertzj(@RequestBody Cashier cashier);
    @RequestMapping ("/deletezj")
    public boolean deletezj(@RequestParam int cashierId);
    @RequestMapping("updatejj")
    public boolean updatejj(@RequestParam int totalstock,@RequestParam int goodsId,@RequestParam int goodsamount);
    @RequestMapping("deletesc")
    public boolean deletesc(@RequestParam int goodsId);

}
